package br.com.fiap.trabalho.util;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class JPAUtil {

	public static EntityManager getEntityManager(final String peristenceUnit){
		EntityManagerFactory emf = Persistence.createEntityManagerFactory(peristenceUnit);
		EntityManager em = emf.createEntityManager();
		
		return em;
	}
	
}
